home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / PDraw3.0.adf / pdraw_rex.lzh / PointsOffset.pdrx < prev    next >
Text File  |  1992-06-15  |  857b  |  53 lines

  1. /*
  2. @N
  3.  
  4. This Genie will move a selection of points by a user specified offset
  5. */
  6. call pdm_AutoUpdate(0)
  7. cr = '0a'x
  8. counter = 0
  9.  
  10. do forever
  11.  
  12.     point = pdm_ClickOnPoint("Click on points to be moved..")
  13.     obj        = word(point, 1)
  14.  
  15.     if obj = 0 then 
  16.         break
  17.     else if ~pdm_isbezier(obj) then 
  18.         exit_msg("Object must be made up of bezier")
  19.  
  20.     counter = counter + 1
  21.     objects.counter = point
  22. end
  23.  
  24. if counter = 0 then exit_msg()
  25.  
  26. newpos = pdm_GetForm("Enter offsets", 8, "X"cr"Y")
  27. if newpos = '' then exit_msg()
  28.  
  29. parse var newpos x '0a'x y
  30.  
  31. if ~(datatype(x, n) & datatype(y, n)) then
  32.     exit_msg("Invalid Entry")
  33.  
  34. do i = 1 to counter
  35.  
  36.     obj = word(objects.i, 1)
  37.     point = word(objects.i, 2)
  38.  
  39.     call pdm_MovePoint(obj, point, x, y)
  40. end
  41.  
  42.  
  43. exit_msg()
  44.  
  45. exit_msg: procedure
  46. do
  47.     parse arg message
  48.  
  49.     if message ~= '' then call pdm_Inform(1,message,)
  50.     call pdm_AutoUpdate(1)
  51.     exit
  52. end
  53.